package orders

class Orders {
    int  cherry
    int curlyMaple
    int genuineMagohany
    int wenge
	int whiteOak
	int sawDust
	String buyerName
	String adress
    static constraints = {
		buyerName blank: false, size: 3..15, unique: true
		
    }
    
    def shippingTime(amount, deliveryTime){
        if (amount <= 100 && amount >0 ) return deliveryTime
        if (amount <= 200 && amount >100 ) return deliveryTime*2
        if (amount <= 300 && amount >200 ) return deliveryTime*3
        if (amount <= 400 && amount >300 ) return deliveryTime*4
        if (amount <= 500 && amount >400 ) return deliveryTime*5
        if (amount <= 1000 && amount >500 ) return deliveryTime*5.5
    }
    
}
